<!DOCTYPE html>
<!-- 网页使用的语言 -->
<html lang="zh-CN">
    <head>
    	<base href="<%=basePath%>"/>
        <!-- 指定字符集 -->
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>修改图书类型</title>

        <link href="/static/css/bootstrap.min.css" rel="stylesheet">
        <script src="/static/js/jquery-2.1.0.min.js"></script>
        <script src="/static/js/bootstrap.min.js"></script>

    </head>
    <body>


        <div class="container" style="width: 400px;">
        <h3 style="text-align: center;">修改图书类型</h3>
        <form action="/booktypeupdate/" method="post">


        <input type="hidden" class="form-control" id="id" name="id" value="{{ booktype.id }}" />

        <div class="form-group">
            <label for="typename">图书类型名称：</label>
            <input type="text" class="form-control" value="{{ booktype.typename }}" id="typename" name="typename" placeholder="请输入图书类型名称">
        </div>

        <div class="form-group">
            <label for="bookprice">图书种类：</label>
            {% for book in booklist %}

                {% if book in  booktype.books.all %}
                    <input type="checkbox" checked="checked"  name="bookids" value="{{ book.id }}"/>{{ book.bookname }}
                {% else %}
                    <input type="checkbox" name="bookids" value="{{ book.id }}"/>{{ book.bookname }}
                {% endif %}



            {% endfor %}

        </div>




             <div class="form-group" style="text-align: center">
                <input class="btn btn-primary" type="submit" value="提交" />
                <input class="btn btn-default" type="reset" value="重置" />
                <input class="btn btn-default" type="button" value="返回"/>
             </div>
        </form>
        </div>
    </body>
</html>